nonlinux_utime
authorDebian Qt/KDE Maintainers <debian-qt-kde@lists.debian.org>
Thu, 15 Aug 2019 14:15:39 +0000 (15:15 +0100)
committerDmitry Shachnev <mitya57@debian.org>
Thu, 15 Aug 2019 14:15:39 +0000 (15:15 +0100)
Gbp-Pq: Name nonlinux_utime.diff

qmake/library/ioutils.cpp
src/corelib/io/qfilesystemengine_unix.cpp

index fd84dff59d613bf5c8c2b7bccd3b5a823f7e0c01..3db298a24cc8ab9f5d59c7262bd13b3e171352da 100644 (file)
@@ -222,7 +222,7 @@ bool IoUtils::touchFile(const QString &targetFileName, const QString &referenceF
         *errorString = fL1S("Cannot stat() reference file %1: %2.").arg(referenceFileName, fL1S(strerror(errno)));
         return false;
     }
-#    if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L
+#    if defined(_POSIX_VERSION) && _POSIX_VERSION >= 200809L && defined(UTIME_NOW)
     const struct timespec times[2] = { { 0, UTIME_NOW }, st.st_mtim };
     const bool utimeError = utimensat(AT_FDCWD, targetFileName.toLocal8Bit().constData(), times, 0) < 0;
 #    else
index 964dcebeb2b5ccc799da01b71128b6adc607d0ac..5fa4a685b264a5f7be0ea905a94274ad4eb06519 100644 (file)
@@ -1407,7 +1407,7 @@ bool QFileSystemEngine::setFileTime(int fd, const QDateTime &newDate, QAbstractF
         return false;
     }
 
-#if QT_CONFIG(futimens)
+#if QT_CONFIG(futimens) && defined(UTIME_OMIT)
     struct timespec ts[2];
 
     ts[0].tv_sec = ts[1].tv_sec = 0;